package cn.edu.neu.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.edu.neu.model.Systemset;
import cn.edu.neu.service.SystemsetService;



@Controller
public class SystemsetAction {
	
	@Autowired
	private SystemsetService sysService;

	/**
	 * @author Chaos
	 *数据配置
	 */
	@RequestMapping("/oneset")
	public String Oneset(Model model) {
		List<Systemset> oneset=sysService.getOneset();
		model.addAttribute("oneset",oneset);
		return "/System/oneset";
	}
	
	
	/**
	 * 
	 * @param 
	 * @return
	 */
	@ResponseBody
	@RequestMapping("/findgmgn")
	public Systemset findgmgn(String grade,String member_grade_name){
		Systemset systemSet=sysService.findgmgn(grade,member_grade_name);
		return systemSet;
	}
	
	@ResponseBody
	@RequestMapping("/findtuijianmoney")
	public Systemset findtuijianmoney( String mg_id){
		Systemset systemSet=sysService.findtuijianmoney(mg_id);
		/*String ii=systemSet.toString();
		System.out.print(ii);*/
		return systemSet;
	}
}
